/**
 * 权限相关类型定义
 */

export interface Permission {
  id: string
  name: string
  code: string
  type: 'menu' | 'button' | 'api'
  parentId?: string
  path?: string
  icon?: string
  sort: number
  description?: string
  children?: Permission[]
}

export interface Role {
  id: string
  name: string
  code: string
  description?: string
  permissions: string[]
  status: 'active' | 'inactive'
  createdAt: string
  updatedAt: string
}

export interface User {
  id: string
  username: string
  name: string
  email: string
  avatar?: string
  roles: string[]
  status: 'active' | 'inactive'
  createdAt: string
  updatedAt: string
}

export interface UserRole {
  userId: string
  roleId: string
}

export interface RolePermission {
  roleId: string
  permissionId: string
}